From: Philip Withnall Date: Wed, 2 Apr 2025 11:32:40 +0000 (+0100) Subject: breakManager: Update manager state after settings change X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~139^2^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=76882225a40abfd15c67a031c898c2368e9edde5;p=gnome-shell.git breakManager: Update manager state after settings change The change of settings may have affected when a break is due. In particular, `this._breakLastEnd` is modified in `_updateSettings()`, but `this._state` is not modified correspondingly to transition to/from a `BREAK_DUE` state (if appropriate). This could be the cause of the `breakDueAgo should be non-negative` assertion failure from #8280. Signed-off-by: Philip Withnall Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8280 Part-of: --- diff --git a/js/misc/breakManager.js b/js/misc/breakManager.js index 4374af2d5..06c88e06a 100644 --- a/js/misc/breakManager.js +++ b/js/misc/breakManager.js @@ -180,10 +180,15 @@ export const BreakManager = GObject.registerClass({ } } + this.freeze_notify(); this.notify('next-break-due-time'); if (this._state === BreakState.DISABLED) this._startStateMachine(); + else + this._updateState(currentTime); + + this.thaw_notify(); return true; }